/*************************************************************************
    cout<<"default construct\n";
	> File Name: treeNode.cpp
	> Author: 
	> Mail: 
	> Created Time: 2017年03月29日 星期三 22时16分55秒
 ************************************************************************/

#include<iostream>
#include "treeNode.h"
using namespace std;

template<typename T>
TreeNode<T>::TreeNode()
{
    left = right = -1;
}

template<typename T>
TreeNode<T>::TreeNode(const T &t)
{
    this->t = t;
}

template<typename T>
int TreeNode<T>::getLeft()
{
    return left;
}

template<typename T>
int TreeNode<T>::getRight()
{
    return right;
}

template<typename T>
void TreeNode<T>::setLeft(int index)
{
    left = index;
}

template<typename T>
void TreeNode<T>::setRight(int index)
{
    right = index;
}


template<typename T>
void TreeNode<T>::setNode(const T &t, int left, int right)
{
    this->t = t;
    this->left = left;
    this->right = right;
}

template<typename T>
T&& TreeNode<T>::getNode()
{
    return std::move(t);
}
